package com.acme.bankapp.domain.bank;

import java.util.ArrayList;
import java.util.List;

public class Client {
    List<Account> accounts;
    String name;
    Gender gender;


    public Client() {
        accounts = new ArrayList<Account>();
    }

    public Client(String name, Gender gender) {
        this();
        this.gender = gender;
        this.name = name;
    }

    public List<Account> getAccounts() {
        return accounts;
    }

    public void addAccount(Account acc) {
        this.getAccounts().add(acc);
    }

    //it's stupid to create method get* which returns nothing, but this is the clause.
    public void getClientSalutation() {
        if (gender != null && name != null) {
            System.out.println(gender + " " + name);
        }
    }
}
